
package com.jf.cloud.api.combo.feign;

import com.jf.cloud.common.feign.FeignInsideAuthConfig;
import com.jf.cloud.common.product.vo.ComboSpuVO;
import com.jf.cloud.common.response.ServerResponseEntity;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author zz
 * @date 2022/9/28 9:45
 */
@FeignClient(value = "jfcloud-combo",contextId ="comboSpu")
public interface ComboSpuFeignClient {

    /**
     * 根据套餐id获取套餐项商品信息
     * @param comboId
     * @return
     */
    @GetMapping(value = FeignInsideAuthConfig.FEIGN_INSIDER_URL_PREFIX + "/comboSpu/comboSpuByComboId")
    ServerResponseEntity<List<ComboSpuVO>> comboSpuByComboId(@RequestParam("comboId") Long comboId);

    /**
     * 商品下架或者平台下架后的套餐商品处理
     * @param spuIdList
     * @return
     */
    @GetMapping(value = FeignInsideAuthConfig.FEIGN_INSIDER_URL_PREFIX + "/comboSpu/comboSpuOfflineDispose")
    ServerResponseEntity<Void> comboSpuOfflineDispose(@RequestBody List<Long> spuIdList);
}
